﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WcfService1;

namespace Client
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            Service1. client = new Service2.Service2Client();
            client.Open();
            this.label1.Text = "服务已启动";
            Form2 f2 = new Form2();
            f2.ShowDialog();
        }
        private void button2_Click(object sender, EventArgs e)
        {
            Service2.Service2Client client = new Service2.Service2Client();
            client.Close();
            this.label1.Text = "服务已关闭";
        }
    }
}
